#ifndef __DB_H__
#define	__DB_H__

struct user * db_load_user(int id);
struct summon* db_load_summon(int id);
struct item* db_load_item(int id);
int db_init();

#define USER_I_ID	0
#define USER_C_NAME	1	
#define USER_C_ITEM	2
#define USER_C_SUMMON	3
#define USER_I_SEX	4
#define USER_I_SCHOOL	5
#define USER_I_HP	6
#define USER_I_HPEFF	7
#define USER_I_MP	8
#define USER_I_STRONG	9
#define USER_I_WISDOM	10
#define USER_I_PHYSIQUE	11
#define USER_I_AGILE	12
#define USER_I_WEN	13
#define USER_C_SKILL	14
#define USER_C_FACE	15
#define USER_C_EQUIPA	16
#define USER_C_EQUIPB	17
#define USER_C_EQUIPC	18
#define USER_C_EQUIPD	19
#define USER_C_EQUIPE	20
#define USER_C_EQUIPF	21
#define USER_C_EQUIPG	22

#define ITEM_I_ID		0
#define	ITEM_C_NAME		1
#define	ITEM_I_OWNER		2
#define	ITEM_I_POS		3
#define	ITEM_I_FRAME		4
#define	ITEM_I_AMOUNT		5
#define	ITEM_I_HARDINESSMAX	6
#define	ITEM_I_HARDINESS	7
#define	ITEM_I_TYPE		8
#define	ITEM_C_SHAPE		9

#define	SUMMON_I_ID		0
#define	SUMMON_C_NAME		1
#define	SUMMON_I_TYPE		2
#define	SUMMON_I_OWNER		3
#define	SUMMON_I_HP		4
#define	SUMMON_I_MP		5
#define	SUMMON_I_EXP		6
#define	SUMMON_C_SKILL		7
#define	SUMMON_I_POS		8
#define	SUMMON_I_FRAME		9
#define	SUMMON_I_POINT		10
#define	SUMMON_I_STRONG		11
#define	SUMMON_I_TALENT		12
#define	SUMMON_I_AGILE		13
#define	SUMMON_I_WISDOM		14
#define	SUMMON_I_RNSAVVY	15
#define	SUMMON_I_WLSAVVY	16
#define	SUMMON_I_JSSAVVY	17
#define	SUMMON_I_TPSAVVY	18
#define	SUMMON_I_MJSAVVY	19


#endif
